function[xb,yb,ub,vb,theta,dtheta]=moving_coord2D_phi(n,R,t,om,phi);
A=1.5;
a=A*cos(om*t+phi);
dtheta=2*pi/n;
theta=[0:dtheta:2*pi-dtheta];
for j=1:n
    xb(j)=cos(theta(j))*(sqrt(R^2-a^2/2)+a*cos(2*theta(j)));
    yb(j)=sin(theta(j))*(sqrt(R^2-a^2/2)+a*cos(2*theta(j)));
    ub(j)=cos(theta(j))*(om*a*sin(om*t+phi)/(2*sqrt(R^2-a^2/2))-om*sin(om*t+phi)*cos(2*theta(j)));
    vb(j)=sin(theta(j))*(om*a*sin(om*t+phi)/(2*sqrt(R^2-a^2/2))-om*sin(om*t+phi)*cos(2*theta(j)));
end
